package cn.b.sky.admin.service.impl;

import cn.b.sky.admin.dao.SaUserDao;
import cn.b.sky.admin.model.SaUser;
import cn.b.sky.admin.service.SaUserService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("saUserService")
public class SaUserServiceImpl implements SaUserService {

  @Autowired
  private SaUserDao saUserDao;
  
  @Override
  public SaUser getSaUserByUserCode(String userCode) {
    if(StringUtils.isBlank(userCode)){
      return null;
    }
    return saUserDao.selectSaUserByUserCode(userCode);
  }

  @Override
  public void updateUserPwd(String userCode, String password) {
    if(StringUtils.isBlank(userCode)){
      return ;
    }
    saUserDao.updateUserPwd(userCode, password);
  }
}
